/*    */ package com.zimbra.cs.client.soap;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.DomUtil;
/*    */ import com.zimbra.common.soap.MailConstants;
/*    */ import com.zimbra.cs.client.LmcConversation;
/*    */ import org.dom4j.DocumentHelper;
/*    */ import org.dom4j.Element;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class LmcGetConvRequest
/*    */   extends LmcSoapRequest
/*    */ {
/*    */   private String mConvID;
/*    */   private String[] mMsgsToGet;
/*    */   
/*    */   public void setConvToGet(String f)
/*    */   {
/* 35 */     this.mConvID = f;
/*    */   }
/*    */   
/* 38 */   public void setMsgsToGet(String[] m) { this.mMsgsToGet = m; }
/*    */   
/* 40 */   public String getConvToGet() { return this.mConvID; }
/*    */   
/* 42 */   public String[] getMsgsToGet() { return this.mMsgsToGet; }
/*    */   
/*    */   protected Element getRequestXML()
/*    */   {
/* 46 */     Element request = DocumentHelper.createElement(MailConstants.GET_CONV_REQUEST);
/*    */     
/*    */ 
/* 49 */     Element convElement = DomUtil.add(request, "c", "");
/* 50 */     DomUtil.addAttr(convElement, "id", this.mConvID);
/*    */     
/*    */ 
/* 53 */     if (this.mMsgsToGet != null) {
/* 54 */       for (int i = 0; i < this.mMsgsToGet.length; i++) {
/* 55 */         Element m = DomUtil.add(convElement, "m", "");
/* 56 */         DomUtil.addAttr(m, "id", this.mMsgsToGet[i]);
/*    */       }
/*    */     }
/*    */     
/* 60 */     return request;
/*    */   }
/*    */   
/*    */ 
/*    */   protected LmcSoapResponse parseResponseXML(Element responseXML)
/*    */     throws ServiceException, LmcSoapClientException
/*    */   {
/* 67 */     LmcConversation c = parseConversation(DomUtil.get(responseXML, "c"));
/* 68 */     LmcGetConvResponse response = new LmcGetConvResponse();
/* 69 */     response.setConv(c);
/* 70 */     return response;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/client/soap/LmcGetConvRequest.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */